

<%@ page import="org.tailor.Fabric" %>
<html>
   <head>

<meta name="layout" content="mainLayout" />
<g:set var="entityName"
	value="${message(code: 'fabric.label', default: 'Fabric')}" />

	
</head>
<body>
	<div id="col_middle">
	
	<h1>
			<g:message code="default.create.label" args="[entityName]" />
		</h1><br/>
		<g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
		<g:form  method="post" controller="fabric" action="save" enctype="multipart/form-data">

			<div class="dialog">
				<table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="fabricID"><g:message code="fabric.fabricID.label" default="Fabric ID" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: fabricInstance, field: 'fabricID', 'errors')}">
                                    <g:textField name="fabricID" value="${fieldValue(bean: fabricInstance, field: 'fabricID')}" /><br/><br/>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="fabricName"><g:message code="fabric.fabricName.label" default="Fabric Name" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: fabricInstance, field: 'fabricName', 'errors')}">
                                    <g:textField name="fabricName" value="${fabricInstance?.fabricName}" /><br/><br/>
                                </td>
                            </tr>
                        <tr class="prop">
							<td valign="top" class="name"><label for="fabricPicture"><g:message
										code="fabric.fabricPicture.labe" default="Fabric Picture" />
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: fabricInstance, field: 'fabricPicture', 'errors')}">
								<input type="file" id="fabricPicture" name="fabricPicture" size="12"  />
								<br/><br/>							
							</td>
						</tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="code"><g:message code="fabric.code.label" default="Code" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: fabricInstance, field: 'code', 'errors')}">
                                    <g:textField name="code" value="${fieldValue(bean: fabricInstance, field: 'code')}" /><br/><br/>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="date"><g:message code="fabric.date.label" default="Date" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: fabricInstance, field: 'date', 'errors')}">
                                    <g:datePicker name="date" precision="day" value="${fabricInstance?.date}"  /><br/><br/>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="description"><g:message code="fabric.description.label" default="Description" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: fabricInstance, field: 'description', 'errors')}">
                                    <g:textField name="description" value="${fabricInstance?.description}" /><br/><br/>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="fabricType"><g:message code="fabric.fabricType.label" default="Fabric Type" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: fabricInstance, field: 'fabricType', 'errors')}">
                                    <g:textField name="fabricType" value="${fabricInstance?.fabricType}" /><br/><br/>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="imported"><g:message code="fabric.imported.label" default="Imported" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: fabricInstance, field: 'imported', 'errors')}">
                                    <g:textField name="imported" value="${fieldValue(bean: fabricInstance, field: 'imported')}" /><br/><br/>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="price"><g:message code="fabric.price.label" default="Price" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: fabricInstance, field: 'price', 'errors')}">
                                    <g:textField name="price" value="${fieldValue(bean: fabricInstance, field: 'price')}" /><br/><br/>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="regionUsed"><g:message code="fabric.regionUsed.label" default="Region Used" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: fabricInstance, field: 'regionUsed', 'errors')}">
                                    <g:textField name="regionUsed" value="${fabricInstance?.regionUsed}" /><br/><br/>
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>

                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
